package com.demoapps.client.mvp.activity;

import com.demoapps.client.ClientFactory;
import com.demoapps.client.mvp.view.IMainView;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.AcceptsOneWidget;

public class MainActivity extends AbstractMainActivity implements IMainView.IMainPresenter {
	private ClientFactory clientFactory;
	
	public MainActivity(ClientFactory clientFactory) {
		this.clientFactory = clientFactory;
	}

	@Override
	public void start(AcceptsOneWidget panel, EventBus eventBus) {
		final IMainView view = clientFactory.getMainView();
		view.setPresenter(this);
		panel.setWidget(view.asWidget());
	}
}
